#ifndef EXECUTELOGDLG_H
#define EXECUTELOGDLG_H

#include "Entity/JobLog.h"
#include "Utils.h"
#include "api/systemMonitor/timedtaskmanagerapi.h"
#include <QDialog>
#include <Entity/DictData.h>

namespace Ui {
class ExecuteLogDlg;
}

class ExecuteLogDlg : public QDialog
{
    Q_OBJECT

public:
    explicit ExecuteLogDlg(QList<DictData> sys_job_group,QString id = "",QWidget *parent = nullptr);
    ~ExecuteLogDlg();

private slots:
    void on_btn_close_clicked();

    void on_btn_delete_clicked();

    void on_comboBox_pageItem_currentIndexChanged(int index);

private:
    Ui::ExecuteLogDlg *ui;
    Utils utils;
    QString id;
    QList<DictData> sys_common_status;
    QList<DictData> sys_job_group;
    QList<JobLog> logList;
    int pageSize = 10;
    int total;
    int currentPage = 1;
    int totalPage;
    TimedTaskManagerApi api;
    QDialog *moreDlg;
    Job job;


    void init();
    void getDictList();
    void initSearchArea();
    void getList();
    void initTable();
    void initPageInfo();
};

#endif // EXECUTELOGDLG_H
